import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: '0.0.0.0',  // 这样配置可以允许通过IP访问
    port: 6574,
    proxy: {
      '/api': {
        target: 'http://localhost:6575',
        changeOrigin: true
      },
      '/colddata': {
        target: 'http://localhost:6575',
        changeOrigin: true,
      },
      '/thumbnails': {
        target: 'http://localhost:6575',
        changeOrigin: true,
      }
    }
  }
})
